#encoding:UTF-8
#!./python2.7
import tornado
import tornado.web
import tornado.ioloop
import tornado.options
import tornado.autoreload
import tornado.process
from tornado.options import define, options
from xoso import XosoHandler
import config
define("port", default=config.port_server, help="services run on the given port", type=int)
application = tornado.web.Application([
    (r"/apis/xoso/(.*)", XosoHandler),
])

if __name__ == "__main__":
    tornado.options.parse_command_line()
    print 'services running at port:', options.port
    application.listen(options.port)
    io_loop = tornado.ioloop.IOLoop.instance()
    #tornado.autoreload.start(io_loop)
    io_loop.start()
    
    
    
